
package com.crowdfunding.circle.admin.dao;

import java.util.Map;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

/**
 * Dao实现类
 *
 * @author 朱国军
 * @version 2016年04月09日 朱国军
 */
@Repository("adminDao")
public class AdminDao extends SqlSessionDaoSupport {

    @Resource(name = "sqlSessionFactory")
    private SqlSessionFactory sqlSessionFactory;
    
    @PostConstruct
    public void SqlSessionFactory() {
        super.setSqlSessionFactory(sqlSessionFactory);
    }
    
    /**
     * 查询系统统计信息
     *
     * @return 获取系统统计信息
     */
    public Map<String, Object> queryStatData() {
        return this.getSqlSession().selectOne("query_stat_data");
    }
}
